<?php
/**
 * @Entity
 * @Table(name="pizza_default_topping")
 */

class OrderTopping {



	/**
	 * @Id
	 * @Column(name="order_item_id", type="string", length=50, nullable=false)
	 */
	private $orderItemId;

	/**
	 * @Id
	 * @Column(name="topping_name", type="string", length=50, nullable=false)
	 */
	private $toppingName;

	/**
	 * @Column(name="quantity", type="integer", length=11, nullable=false)
	 */
	private $quantity;

	/**
	 * @Column(name="position", type="integer", length=11, nullable=false)
	 */
	private $position;

	function OrderTopping($pizza){
		$this->setPosition($pizza["position"]);
		$this->setQuantity($pizza["quantity"]);
		$this->setToppingName($pizza["topping_name"]);
		$this->setOrderItemId($pizza["order_item_id"]);
	}

	public function getOrderItemId() 
	{
		return $this->orderItemId;
	} 

	public function setOrderItemId($orderItemId) 
	{
		$this->orderItemId = $orderItemId;
	} 

	public function getToppingName() 
	{
		return $this->toppingName;
	} 

	public function setToppingName($toppingName) 
	{
		$this->toppingName = $toppingName;
	} 

	public function getQuantity() 
	{
		return $this->quantity;
	} 

	public function setQuantity($quantity) 
	{
		$this->quantity = $quantity;
	} 

	public function getPosition() 
	{
		return $this->position;
	} 

	public function setPosition($position) 
	{
		$this->position = $position;
	} 

	public static function dbGetOrderToppings($where){
		return dbGet("OrderTopping", "order_topping", $where);
	}
}
?>